package tech.aister.day01.homework;

public class computer {
    private String Cbrand;
    private double Cprice;
    private String Cdes;
    private Screen Screen;

    public computer(){

    }

    public computer(String Cbrand, double Cprice, String Cdes){

        this.Cbrand = Cbrand;
        setCprice(Cprice);
        this.Cdes = Cdes;
    }

    public String getCbrand(){return Cbrand;}

    public double getCprice() {
        return Cprice;
    }

    public String getCdes() {
        return Cdes;
    }

    public Screen getScreen() {
        return Screen;
    }

    public void setCbrand(String cbrand) {
        Cbrand = cbrand;
    }

    public void setCprice(double cprice) {
        if(cprice<1000||cprice>20000){
            this.Cprice = 2000;
            return;
        }

        this.Cprice = cprice;
    }

    public void setCdes(String cdes) {
        Cdes = cdes;
    }

    public void setScreen(Screen screen) {
        Screen = screen;
    }

    @Override
    public String toString() {
        return "computer{" +
                "Cbrand='" + Cbrand + '\'' +
                ", Cprice=" + Cprice +
                ", Cdes='" + Cdes + '\'' +
                '}';
    }
}
